<%-- 
    Document   : lihatTamu
    Created on : Nov 10, 2011, 10:54:36 PM
    Author     : Renaldo Malau
--%>

<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="databaseConnection.DatabaseConnection"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
    "http://www.w3.org/TR/html4/loose.dtd">
<%@include file="login_validasi.jsp" %>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>JSP Page</title>
    </head>
    <body bgcolor="black">
        <table border="1" bgcolor="white">
            <tr><td colspan="6" > 
                    <img src="images hotel/894_1_1000 bbg central hotel Bangkok 1.jpg" height="140" width="1350">
            <marquee style="font-family:Broadway BT;color:blue;font-size:20px">WELCOME TO HOTEL ADMF WEBSITE</marquee>
        </td>
    </tr>
    <tr>
        <td align="justify" valign="top" bgcolor="#69F" height="500">

            <img src="images hotel/menu header.jpg" height="65" width="270" align="middle">
            <table border="1" style="background: #CF9" align="center" width="270">
                <tr><td><a href="resepsionis.jsp"><input type="button" value="Resepsionis"/></a></td></tr>
                <tr><td> <a href="lihat&UpdateTamu.jsp"><input type="button" value="lihat tamu"/></a></td></tr>
                <tr><td> <a href="ubahStatus.jsp" ><input type="button" value="Ubah status"/></a></td></tr>
                <tr><td> <a href="logout.jsp"><input type="button" value="Logout"/></a></td></tr>
            </table>
        </td>
        <td valign="top">
            <center><b><h1 style="background-color:#69F">Lihat dan Update data Tamu<HR></h1></b></center><br>
                        <%         DatabaseConnection conn = new DatabaseConnection();
                            Statement st = conn.connection.createStatement();
                            ResultSet hasil = st.executeQuery("select * from datatamu");
                        %>



            <table border="1" bgcolor="white">
                <tr>
                    <th><b>Nama</b></th>
                    <th><b>Tgl Lahir</b></th>
                    <th><b>Jenis Kelamin</b></th>
                    <th><b>Nomor Telepon</b></th>
                    <th><b>Nomor Rekening</b></th>
                    <th><b>Nama Pemilik rekening</b></th>
                    <th><b>Pesan Gedung</b></th>
                    <th><b>Pesan Restoran</b></th>
                    <th><b>Pesan Kamar</b></th>
                    <th><b>Jenis Kamar</b></th>
                    <th><b>Jumlah Kamar</b></th>
                    <th><b>Uang Muka</b></th>
                    <th><b>Status Pembayaran</b></th>
                    <th><b>Update</b></th>
                </tr>


                <%  while (hasil.next()) {%>
                <form action="prosesDataTamu.jsp" >
                    <%
                        out.println("<TR>");
                        out.println("<TD>" + hasil.getString(1) + "</TD>");
                        out.println("<TD>" + hasil.getString(2) + "</TD>");
                        out.println("<TD>" + hasil.getString(3) + "</TD>");
                        out.println("<TD>" + hasil.getString(4) + "</TD>");
                        out.println("<TD>" + hasil.getString(5) + "</TD>");
                        out.println("<TD>" + hasil.getString(6) + "</TD>");
                        out.println("<TD>" + hasil.getString(7) + "</TD>");
                        out.println("<TD>" + hasil.getString(8) + "</TD>");
                        out.println("<TD>" + hasil.getString(9) + "</TD>");
                        out.println("<TD>" + hasil.getString(10) + "</TD>");
                        out.println("<TD>" + hasil.getString(11) + "</TD>");
                        out.println("<TD>" + hasil.getString(12) + "</TD>");
                        out.println("<TD>" + hasil.getString(13) + "</TD>");
                        out.println("<TD><input type=\"hidden\" name=\"telepon\" value=\"" + hasil.getString(4) + "\"/> "
                                + "<select name=\"update\">"
                                + "<option value=\"pesan\">Pesan</option>"
                                + "<option value=\"pesan DP\">Pesan DP</option>"
                                + "<option value=\"Hapus\">Hapus Tamu</option>"
                                + "</select> <input type=\"Submit\" value=\"Submit\"/></TD><TR>");

                    %></form><%
                          }
                    %>
            </table>


        </td>
    </tr>
</table>

</body>
</html>
